load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "replicaoracle",
    srcs = ["oracle.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/sql/physicalplan/replicaoracle",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/kv",
        "//pkg/kv/kvclient",
        "//pkg/kv/kvclient/kvcoord",
        "//pkg/roachpb",
        "//pkg/rpc",
        "//pkg/settings/cluster",
        "//pkg/sql/sqlerrors",
        "//pkg/util",
        "//pkg/util/hlc",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "replicaoracle_test",
    size = "small",
    srcs = ["oracle_test.go"],
    embed = [":replicaoracle"],
    deps = [
        "//pkg/gossip",
        "//pkg/roachpb",
        "//pkg/settings/cluster",
        "//pkg/testutils",
        "//pkg/util",
        "//pkg/util/hlc",
        "//pkg/util/leaktest",
        "//pkg/util/metric",
        "//pkg/util/stop",
        "@com_github_stretchr_testify//require",
    ],
)
